/**
 * 表单元素展示
 */

let element = {
  view_farm:{flag:true},
  view_nonfarm:{flag:true},
  view_education:{flag:true},
  view_school:{flag:true},
  view_generalSchool:{flag:true},
  view_specialSchool:{flag:true},
  view_school:{flag:true},
  view_notEnrolledReason:{flag:true},
  view_employ:{flag:true},
  view_employType:{flag:true},
  view_unemployedIncome:{flag:true},
  view_unemployedReason:{flag:true},
  view_employAssist:{flag:true},
  view_employAssistNeed:{flag:true},
  view_socialInsurance:{flag:true},
  view_endowmentInsurance:{flag:true},
  view_endowmentSubsidy:{flag:true},
  view_medicalInsurance:{flag:true},
  view_medicalSubsidy:{flag:true},
  view_socialAssist:{flag:true},
  view_socialWelfare:{flag:true},
  view_foster:{flag:true},
  view_fosterNeed:{flag:true},
  view_sickCure:{flag:true},
  view_notCureReason:{flag:true},
  view_rehabilitation:{flag:true},
  view_noRehabilitationReason:{flag:true},
  view_rehabilitationNeed:{flag:true},
  view_inactivityReason:{flag:true},
  view_hostName:{flag:true},
  view_hostIdentityCard:{flag:true},
  submit:{}
};
// r4.婚姻状况
element.columns_marriage = [
  { text: "1.未婚", value: "1" },
  { text: "2.已婚有配偶", value: "2" },
  { text: "3.离婚", value: "3" },
  { text: "4.丧偶", value: "4" }
];

//r8.非农业家庭人均收入状况
element.columns_nonfarmEconomy = [
  { text: "1.低于低保标准", value: "1" },
  { text: "2.低于低收入标准或低保边缘标准", value: "2" },
  { text: "3.其他", value: "3" }
];

//r9.非农业家庭住房状况
element.columns_nonfarmHousing = [
  { text: "1.自有产权住房", value: "1" },
  { text: "2.享受住房保障政策（廉租房或公租房等）", value: "2" },
  { text: "3.租赁房", value: "3" },
  { text: "4.借住或无固定住所", value: "4" }
];

//r10.农业贫困与建档立卡状况
element.columns_farmEconomy = [
  { text: "1.国家建档立卡贫困户", value: "1", disabled: true },
  { text: "2.其他贫困人口", value: "2" },
  { text: "3.其他", value: "3" }
];

//r11.农业家庭住房状况
element.columns_farmHousing = [
  { text: "1.状况良好", value: "1" },
  { text: "2.经鉴定属危房", value: "2" },
  { text: "3.非鉴定危房", value: "3" },
  { text: "4.租赁房", value: "4" },
  { text: "5.借助或无固定住所", value: "5" }
];

//r13.受教育程度
element.columns_education = [
  { text: "1.从未上过学", value: "1" },
  { text: "2.小学", value: "2" },
  { text: "3.初中", value: "3" },
  { text: "4.高中（含中专）", value: "4" },
  { text: "5.大学专科", value: "5" },
  { text: "6.大学本科", value: "6" },
  { text: "7.研究生", value: "7" }
];

//r14.就读学校普通
element.columns_generalSchool = [
  { text: "请选择", value: "" },
  { text: "1.学前", value: "1" },
  { text: "2.小学", value: "2" },
  { text: "3.初中", value: "3" },
  { text: "4.高中（含普通、职业教育）", value: "4" },
  { text: "5.大学专科", value: "5" },
  { text: "6.大学本科及以上", value: "6" }
];

//r14.就读学校特殊
element.columns_specialSchool = [
  { text: "请选择", value: "" },
  { text: "7.学前", value: "7" },
  { text: "8.小学", value: "8" },
  { text: "9.初中", value: "9" },
  { text: "10.高中（含普通、职业教育）", value: "10" },
  { text: "11.大学专科", value: "11" },
  { text: "12.大学本科及以上", value: "12" }
];

//r15.未入学主要原因
element.columns_notEnrolledReason = [
  { text: "1.残疾程度较重", value: "1" },
  { text: "2.家庭经济困难", value: "2" },
  { text: "3.无学校接收", value: "3" },
  { text: "4.交通不便", value: "4" },
  { text: "5.推迟入学年龄", value: "5" },
  { text: "6.家长无意愿", value: "6" }
];

//r17.残疾人就业形式
element.columns_employType = [
  { text: "1.按比例就业", value: "1" },
  { text: "2.集中就业", value: "2" },
  { text: "3.个体就业（含自主创业）", value: "3" },
  { text: "4.公益性岗位就业", value: "4" },
  { text: "5.辅助性就业", value: "5" },
  { text: "6.农村种养加", value: "6" },
  { text: "7.灵活就业", value: "7" }
];

//r18.未就业生活来源
element.columns_unemployedIncome = [
  { text: "1.退休金（养老金）", value: "1" },
  { text: "2.财产性收入", value: "2" },
  { text: "3.社会救助与社会福利", value: "3" },
  { text: "4.家庭成员供养", value: "4" },
  { text: "5.其他", value: "5" }
];

//r19.未就业主要原因
element.columns_unemployedReason = [
  { text: "1.在校学习", value: "1" },
  { text: "2.退休", value: "2" },
  { text: "3.无就业意愿", value: "3" },
  { text: "4.无就业技能", value: "4" },
  { text: "5.丧失劳动能力", value: "5" },
  { text: "6.农用土地被征用", value: "6" },
  { text: "7.其他", value: "7" }
];

//r20.就业扶贫帮扶
element.columns_employAssist = [
  { text: "1.职业技能培训", value: "1" },
  { text: "2.职业介绍", value: "2" },
  { text: "3.农村实用技术培训", value: "3" },
  { text: "4.资金信贷扶持", value: "4" },
  { text: "5.其他帮扶", value: "5" },
  { text: "6.无", value: "6" }
];

//r21.就业扶贫帮扶需求
element.columns_employAssistNeed = [
  { text: "1.职业技能培训", value: "1" },
  { text: "2.职业介绍", value: "2" },
  { text: "3.农村实用技术培训", value: "3" },
  { text: "4.资金信贷扶持", value: "4" },
  { text: "5.其他帮扶", value: "5" },
  { text: "6.无需求", value: "6" }
];

//r22.是否参加职工社会保险
element.columns_socialInsurance = [
  { text: "1.养老保险", value: "1" },
  { text: "2.医疗保险", value: "2" },
  { text: "3.其他保险（失业、工伤、生育）", value: "3" },
  { text: "4.未参加", value: "4" }
];

//r27.动态年度内社会救助情况
element.columns_socialAssist = [
  { text: "1.最低生活保障", value: "1" },
  { text: "2.特困人员救助供养", value: "2" },
  { text: "3.医疗救助", value: "3" },
  { text: "4.其他救助（教育、住房、就业和其他临时救助）", value: "4" },
  { text: "5.享受住建部门农村危房改造政策（★农业户口填报）", value: "5" },
  { text: "6.无", value: "6" }
];

//r28.动态年度内社会福利补贴情况
element.columns_socialWelfare = [
  { text: "1.困难残疾人生活补贴", value: "1" },
  { text: "2.重度残疾人护理补贴", value: "2" },
  { text: "3.其他福利补贴", value: "3" },
  { text: "4.未享受", value: "4" }
];

//r30.目前托养需求
element.columns_fosterNeed = [
  { text: "1.居家服务", value: "1" },
  { text: "2.日间照料", value: "2" },
  { text: "3.寄宿托养", value: "3" },
  { text: "4.无需求", value: "4" }
];

//r34.未就诊或治疗原因
element.columns_notCureReason = [
  { text: "1.自感病轻", value: "1" },
  { text: "2.经济困难", value: "2" },
  { text: "3.就诊麻烦", value: "3" },
  { text: "4.无时间", value: "4" },
  { text: "5.其他", value: "5" }
];

//r35.动态年度内是否得到或使用过以下服务
element.columns_rehabilitation = [
  { text: "1.手术", value: "1" },
  { text: "2.药物", value: "2" },
  { text: "3.功能训练", value: "3" },
  { text: "4.辅助器具", value: "4" },
  { text: "5.护理", value: "5" },
  { text: "6.未得到", value: "6" }
];

//r36.未得到康复服务的原因
element.columns_noRehabilitationReason = [
  { text: "1.不了解相关知识和信息", value: "1" },
  { text: "2.家庭经济困难", value: "2" },
  { text: "3.交通不便", value: "3" },
  { text: "4.其他", value: "4" }
];

//r37.目前是否还需要以下服务
element.columns_rehabilitationNeed = [
  { text: "1.手术", value: "1" },
  { text: "2.药物", value: "2" },
  { text: "3.功能训练", value: "3" },
  { text: "4.辅助器具", value: "4" },
  { text: "5.护理", value: "5" },
  { text: "6.不需要", value: "6" }
];

//r39.目前是否还需要以下服务
element.columns_barrierFreeNeed = [
  { text: "1.家门口坡化、扶手", value: "1" },
  { text: "2.房门改造", value: "2" },
  { text: "3.卫生间改造", value: "3" },
  { text: "4.厨房改造", value: "4" },
  { text: "5.闪光门铃、可视门铃（聋人用）", value: "5" },
  { text: "6.煤气泄漏报警发声装置（盲人用）", value: "6" },
  { text: "7.上网读屏软件（盲人用）", value: "7" },
  { text: "8.其他", value: "8" },
  { text: "9.无需求", value: "9" }
];

//r41.不能经常参加村社区组织的体育活动的原因
element.columns_inactivityReason = [
  { text: "1.没有适合自己的活动项目", value: "1" },
  { text: "2.没有适合的场所和设施", value: "2" },
  { text: "3.没人组织指导", value: "3" },
  { text: "4.其他", value: "4" }
];

//模块是否禁用
element.modulesValid = {
  baseInfo: {},
  economic: {},
  education: {},
  job: {},
  socialSecurity: {},
  medical: {},
  barrierFree: {},
  sports: {},
  suppleInfo: {},
  farm: {},
  nonfarm: {},
  marriage: {},
  contactName: {},
  literacy: {},
  literacy_2: {},
  educationLevel: {},
  school: {},
  notEnrolledReason: {},
  employ_1: {},
  employType: {},
  unemployedIncome: {},
  unemployedReason: {},
  employAssist: {},
  employAssistNeed: {},
  socialInsurance: {},
  endowmentInsurance: {},
  endowmentInsurance_1: {},
  endowmentSubsidy: {},
  medicalInsurance_1: {},
  medicalSubsidy: {},
  foster: {},
  foster_2: {},
  fosterNeed: {},
  sickCure: {},
  notCureReason: {},
  noRehabilitationReason: {},
  inactivityReason: {},
  collectiveHousehold_1:{},
  hostName:{},
  hostIdentityCard:{},
};

//提示信息
element.tips = {
  school: { message: "提示：此人年龄≥35岁，确定在上学?", disabled: true },
  unemployedIncome: { message: "提示：此人未到退休年龄", disabled: true },
  unemployedReason: { message: "提示：此人未到退休年龄", disabled: true },
  socialInsurance_1: {
    message: "提示：勾选了按比例就业/集中就业，原则上有职工保险",
    disabled: true
  },
  socialInsurance_2: {
    message: "提示：勾选了正在上学，原则上无养老保险",
    disabled: true
  },
  endowmentInsurance: {
    message: "提示：勾选了正在上学，原则上无养老保险",
    disabled: true
  },
  socialAssist_eco: { message: "提示：家庭经济状况勾选了其他,确认是否享受最低生活保障", disabled: true },
  socialAssist_hou: {
    message: "提示：享受住房政策，住房状况应勾选良好",
    disabled: true
  },
  socialAssist_hou_n:{
    message:"提示：上年度为危房，请核实是否享受危房救助政策！",
    disabled: true
  },
  socialWelfare_n: {
    message: "提示：勾选了最低生活保障，确认是否享受困难生活补贴",
    disabled: true
  },
  socialWelfare_y: {
    message: "提示：享受了困难生活补贴，但未享受最低生活保障",
    disabled: true
  }
};

function calcTips_socialInsurance(element) {
  let message = [];
  if (!element.tips.socialInsurance_1.disabled) {
    message.push(element.tips.socialInsurance_1.message);
  }
  if (!element.tips.socialInsurance_2.disabled) {
    message.push(element.tips.socialInsurance_2.message);
  }
  return message.join("\n");
}

function calcTips_socialAssist(element) {
  let message = [];
  if (!element.tips.socialAssist_eco.disabled) {
    message.push(element.tips.socialAssist_eco.message);
  }
  if (!element.tips.socialAssist_hou.disabled) {
    message.push(element.tips.socialAssist_hou.message);
  }
  if (!element.tips.socialAssist_hou_n.disabled) {
    message.push(element.tips.socialAssist_hou_n.message);
  }
  return message.join("\n");
}

function calcTips_socialWelfare(element) {
  let message = [];
  if (!element.tips.socialWelfare_n.disabled) {
    message.push(element.tips.socialWelfare_n.message);
  }
  if (!element.tips.socialWelfare_y.disabled) {
    message.push(element.tips.socialWelfare_y.message);
  }
  return message.join("\n");
}
//支撑数据
element.supportData={
}


export default {
  element,
  calcTips_socialInsurance,
  calcTips_socialAssist,
  calcTips_socialWelfare
};
